package demo5;

/**
 * 实现泛型接口的泛型类
 * @param <T>
 * @param <K>
 */
public class Pair<T,K> implements Generator<T> {
    private T key;
    private K value;

    public Pair(T key, K value) {
        this.key = key;
        this.value = value;
    }

    @Override
    public T getKey() {
        return key;
    }

    public K getValue() {
        return value;
    }
}
